home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Columbia Kermit
/
kermit.zip
/
newsgroups
/
misc.20020314-20021006
/
000166_fdc@columbia.edu_Fri Jun 21 14:09:58 EDT 2002.msg
< prev
next >
Wrap
Text File
|
2020-01-01
|
3KB
|
91 lines
Article: 13470 of comp.protocols.kermit.misc
Path: newsmaster.cc.columbia.edu!news.columbia.edu!news-not-for-mail
From: fdc@columbia.edu (Frank da Cruz)
Newsgroups: comp.protocols.kermit.misc
Subject: Re: Script dropping out to command prompt
Date: 21 Jun 2002 14:09:50 -0400
Organization: Columbia University
Lines: 74
Message-ID: <aevq5e$2bu$1@watsol.cc.columbia.edu>
References: <mGKLjqv1fPVx-pn2-dLJvrE4bbu5F@inisant.jsw.gen.nz>
NNTP-Posting-Host: watsol.cc.columbia.edu
X-Trace: newsmaster.cc.columbia.edu 1024682991 13502 128.59.39.139 (21 Jun 2002 18:09:51 GMT)
X-Complaints-To: postmaster@columbia.edu
NNTP-Posting-Date: 21 Jun 2002 18:09:51 GMT
Xref: newsmaster.cc.columbia.edu comp.protocols.kermit.misc:13470
In article <mGKLjqv1fPVx-pn2-dLJvrE4bbu5F@inisant.jsw.gen.nz>,
Stephen Worthington <stephen@inisant.actrix.gen.nz.x> wrote:
: I am trying to write a script to automate changing some settings on my Cisco
: 827 router via a telnet connection. I am using Kermit 1.1.20 for OS/2.
: This is my first attempt a real Kermit script, so please let me
:
: know if I am doing stupid things :-)
:
: When I run the script, at a certain point I get dropped out of the script to
: a Kermit command prompt. Doing an Alt-X from there causes the script to
: continue to completion. What I do not understand is what causes Kermit to
: go to a command prompt. I can see nothing different at that point in the
: script, or in the interaction with the router.
:
: This is the script at present:
:
Actually it looks quite good. You're checking INPUTs for failure, etc;
which not doing is a common mistake.
: ======================================================================
:
: take {E:\U\K2\SCRIPTS\router_1.ksc}
: if fail end 1 {router login failed}
: lineout conf t
: input 20 {router(config)#}
: if fail end 1 {conf t failed (1)}
: set input timeout-action proceed
: lineout no ip inspect name DIALER-CBAC smtp
: input 50 {router(config)#}
: if fail end 1 {conf t failed (2)}
: clear input
: lineout exit
: set input timeout-action proceed
: set exit on-disconnect off
: input 60 {router#}
: xif fail {
: echo failed
: echo "\v(input)"
: end 1
: }
: echo succeeded
: lineout exit
: end 0
:
: ======================================================================
:
: The router_1.ksc script called at the start is a slight variation on the
: standard login.ksc script that logs in to the router. It works without
: problems. This is what I see when I run the script:
:
: ======================================================================
:
: User Access Verification
:
: Password:
: router>enable
: Password:
: router#conf t
: Enter configuration commands, one per line. End with CNTL/Z.
: router(config)#no ip inspect name DIALER-CBAC smtp
: %entry not found
:
: router(config)#exit
: router#succeeded
: Kermit 95 1.1.20, 31 Mar 2000, for 32-bit OS/2
: Copyright (C) 1985, 2000,
:
It looks to me like your script is working fine, but the "exit" command,
when given to the router, makes it close the connection; thus you return
to K95 command mode. Since there are no more commands in the script,
and since the script did not include an EXIT command (for K95), you get
the prompt.
- Frank